package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 商品促销活动表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_product_promotions")
public class ProductPromotions extends Model<ProductPromotions> {

    private static final long serialVersionUID = 1L;

    /**
     * 促销活动唯一标识
     */
    @TableId("promotion_id")
    private Long promotionId;
    /**
     * 商品ID
     */
    @TableField("product_id")
    private Long productId;
    /**
     * 促销活动名称
     */
    @TableField("promotion_name")
    private String promotionName;
    /**
     * 促销活动开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 促销活动结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 活动状态（0：未开始，1：进行中，2：已结束）
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public ProductPromotions() {
        this.promotionId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getPromotionId() {
        return promotionId;
    }

    public void setPromotionId(Long promotionId) {
        this.promotionId = promotionId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getPromotionName() {
        return promotionName;
    }

    public void setPromotionName(String promotionName) {
        this.promotionName = promotionName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "ProductPromotions{" +
        ", promotionId=" + promotionId +
        ", productId=" + productId +
        ", promotionName=" + promotionName +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", status=" + status +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
